import java.awt.Color;
import java.awt.Graphics;


public class Explode {
	private int x,y;
	private boolean live = true;
	private int step = 0;
	private TankClient tc = null;
	
	int [] diaments = {1,5,10,20,30,45,60,80,37,16,4};
	public Explode(int x,int y,TankClient tc) {
		this.x  = x;
		this.y = y;
		this.tc = tc;
		
	}
	public void draw (Graphics g)
	{
		if (!live) {
			tc.explodes.remove(this);
			return;
		}
		if (step == 8) {
			live =false;
			step = 0;
			return;
		}
		
		Color color = g.getColor();
		g.setColor(color.ORANGE);
		g.fillOval(x, y, diaments[step], diaments[step]);
		g.setColor(color);
		
		step++;
		
		
	}
}
